import { Entity, Column, PrimaryColumn, OneToOne } from 'typeorm'

import { User } from './User'

@Entity()
export class Login {
  @PrimaryColumn({ unique: true })
  id: string

  @Column({ unique: true, length: 18 })
  username: string

  @Column({ length: 18 })
  password: string

  @OneToOne(() => User)
  user: User
}
